@import "mixins/mixins";
@import "common/var";

@include b(tabs) {
  @include e(header) {
    padding: 0;
    position: relative;
  }
  @include e(active-bar) {
    display: none;
  }
  @include e(nav-wrap) {
    overflow: hidden;
    position: relative;
    &::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0;
      width: 100%;
      height: 1px;
      background-color: #47484B;
      z-index: 3;
    }
    @include when(scrollable) {
      padding: 0 20px;
      box-sizing: border-box;
    }
  }
  @include e(nav-scroll) {
    overflow: hidden;
  }
  @include e((nav-next, nav-prev)) {
    position: absolute;
    cursor: pointer;
    line-height: 30px;
    font-size: 12px;
    color: $--color-text-secondary;
  }
  @include e(nav-next) {
    right: 0;
  }
  @include e(nav-prev) {
    left: 0;
  }
  @include e(nav) {
    white-space: nowrap;
    position: relative;
    transition: transform .3s;
    display: flex;
    z-index: #{$--index-normal + 1};
    @include when(stretch) {
      min-width: 100%;
      display: flex;
      & > * {
        flex: 1;
        text-align: center;
      }
    }
  }
  @include e(item) {
    box-sizing: border-box;
    padding-bottom: 10px;
    display: inline-block;
    margin-right: 24px;
    list-style: none;
    position: relative;
    cursor: pointer;
    &:focus, &:focus:active {
      outline: none;
    }
    &:last-child{
      margin-right: 0;
    }
    @include when(active) {
      color: #00BBD7;
      font-weight: bold;
    }
  }
  @include e(content) {
    padding-top: 15px;
    // overflow: hidden;
    position: relative;
  }
}
.el-tabs.theme2{
  .el-tabs__nav-scroll{
    padding: 0 19px;
  }
  .el-tabs__item{
    margin-right: 0;
    // padding-left: 12px;
    padding-right: 12px;
    color: #666666;
    &.is-active{
      color: #D8A04B;
    }
    + .el-tabs__item{
      padding-left: 12px;
    }
    &:last-child{
      padding-right: 0;
    }
  }
  .el-tabs__nav-wrap::after{
    background: rgba(0, 0, 0, .1);
    bottom: 1px;
  }
  .el-tabs__active-bar{
    position: absolute;
    bottom: 0px;
    left: 0px;
    z-index: 1;
    display: block;
    &::after{
      content: '';
      position: absolute;
      left: calc(50% - 18px);
      bottom: 0;
      width: 36px;
      height: 3px;
      background-color: #D8A04B;
      transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;
      list-style: none;
      border-radius: 3px;
  
    }
  }
}

.slideInRight-transition,
.slideInLeft-transition {
  display: inline-block;
}
.slideInRight-enter {
  animation: slideInRight-enter .3s;
}
.slideInRight-leave {
  position: absolute;
  left: 0;
  right: 0;
  animation: slideInRight-leave .3s;
}
.slideInLeft-enter {
  animation: slideInLeft-enter .3s;
}
.slideInLeft-leave {
  position: absolute;
  left: 0;
  right: 0;
  animation: slideInLeft-leave .3s;
}

@keyframes slideInRight-enter {
  0% {
    opacity: 0;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(100%);
    transform: translateX(100%)
  }

  to {
    opacity: 1;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(0);
    transform: translateX(0)
  }
}
@keyframes slideInRight-leave {
  0% {
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(0);
    transform: translateX(0);
    opacity: 1
  }

  100% {
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(100%);
    transform: translateX(100%);
    opacity: 0
  }
}
@keyframes slideInLeft-enter {
  0% {
    opacity: 0;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%)
  }

  to {
    opacity: 1;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(0);
    transform: translateX(0)
  }
}
@keyframes slideInLeft-leave {
  0% {
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(0);
    transform: translateX(0);
    opacity: 1
  }

  100% {
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%);
    opacity: 0
  }
}
